package com.google.code.p.restrpc.client;

import com.google.code.p.restrpc.RpcException;
import com.google.code.p.restrpc.RpcResponse;
import com.google.code.p.restrpc.client.proxy.DefaultRpcResponseHandler;

/**
 * @author dz
 */
public interface RpcResponseHandler {
    
    public static final RpcResponseHandler instance = new DefaultRpcResponseHandler();
    
    /**
     * @param response
     * @param clazz
     * @return
     * @throws RpcException
     */
    public Object handle(RpcResponse response, Class clazz) throws RpcException;
    
}
